package cn.demoncat.util.lang.entity;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * 描述：{id,list}键值对类型的实体类
 *
 * @author yxl
 *
 * @version 2.0
 *
 * @since 2016-12-9
 */
public class IdList implements Serializable {

	private static final long serialVersionUID = 1L;

	private Long id;
	private List<String> list;

	public IdList() {
		super();
	}

	public IdList(Long id, List<String> list) {
		super();
		this.id = id;
		this.list = list;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public List<String> getList() {
		return list;
	}

	public void setList(List<String> list) {
		this.list = list;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		IdList sidList = (IdList) o;
		return Objects.equals(id, sidList.id) &&
				Objects.equals(list, sidList.list);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, list);
	}

	@Override
	public String toString() {
		return "SidList [id=" + id + ", list=" + list + "]";
	}

}
